package com.swak.exception;

/**
 * 账号相关问题
 * 
 * @author 618lf
 */
public class SubjectException extends BusinessException {

	private static final long serialVersionUID = 1L;

	private final ErrorCode error;

	public SubjectException(ErrorCode error) {
		super(error.toJson());
		this.error = new ErrorCode(error.getCode(), error.getMsg());
	}

	public SubjectException(ErrorCode error, String message) {
		super(error.toJson());
		this.error = new ErrorCode(error.getCode(), message);
	}

	public ErrorCode getError() {
		return error;
	}
}
